package com.xbongbong.pro.domain.dao;

import com.xbongbong.pro.domain.entity.ChartDrillEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface ChartDrillDao {
    Integer insert(ChartDrillEntity entity);

    void insertBatch(List<ChartDrillEntity> list);

    /**
     * 批量更新
     * @param list
     * @param corpid
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    void updateBatch(@Param("list") List<ChartDrillEntity> list, @Param("corpid") String corpid);

    ChartDrillEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );
    /**
     * 通过statisticsType、chartId获取钻取配置
     * @param corpid 公司id
     * @param statisticsType 图表类型 StatisticsTypeEnum 1系统 2自定义
     * @param chartId 图表id
     * @return com.xbongbong.pro.domain.entity.ChartDrillEntity
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    ChartDrillEntity getByChartId(@Param("corpid") String corpid, @Param("statisticsType") Integer statisticsType, @Param("chartId") Long chartId);

    Integer update(ChartDrillEntity entity);

    List<ChartDrillEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);
}